# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.676.14.19 -> 1.676.14.20 # drivers/input/joydev.c 1.6 -> 1.7 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/09/27 bjorn_helgaas@hp.com 1.676.14.20 # joydev: fix HZ->millisecond transformation (from 2.5 change by vojtech@suse.cz) # -------------------------------------------- # diff -Nru a/drivers/input/joydev.c b/drivers/input/joydev.c --- a/drivers/input/joydev.c Wed Oct 8 09:07:20 2003 +++ b/drivers/input/joydev.c Wed Oct 8 09:07:20 2003 @@ -50,6 +50,8 @@ #define JOYDEV_MINORS 32 #define JOYDEV_BUFFER_SIZE 64 +#define MSECS(t) (1000 * ((t) / HZ) + 1000 * ((t) % HZ) / HZ) + struct joydev { int exist; int open; @@ -134,7 +136,7 @@ return; } - event.time = jiffies * (1000 / HZ); + event.time = MSECS(jiffies); while (list) { @@ -279,7 +281,7 @@ struct js_event event; - event.time = jiffies * (1000/HZ); + event.time = MSECS(jiffies); if (list->startup < joydev->nkey) { event.type = JS_EVENT_BUTTON | JS_EVENT_INIT;